project(funny-translator)
cmake_minimum_required(VERSION 2.8)
enable_testing()

add_subdirectory(src)
add_subdirectory(tests)

#file( GLOB TEST_ENV RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
        #        src/trans/parser.c
        #        src/engine/common.c
        #        src/engine/launcher.c)

if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
    set(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH "default install path" FORCE)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)

set(ENV{FUNNY_HOME} "${CMAKE_INSTALL_PREFIX}/funny")
MESSAGE(STATUS "$ENV{FUNNY_HOME}")
#set(ENV{PATH} "$ENV{FUNNY_HOME}/bin:$ENV{PATH}")

install(DIRECTORY DESTINATION funny/bin)
install(DIRECTORY DESTINATION funny/engine)
install(DIRECTORY engine DESTINATION funny/engine)

